#!/home/cvhadoop/python/epd/bin/python
import os
import sys
count = 0
for root,dirs,files in os.walk(sys.argv[1]):
	for file in files:
		oldname = os.path.join(root,file)
		newname = os.path.join(sys.argv[2],file.split(".")[0]+".png")
		os.system("convert " + oldname + " " + newname)
		count += 1
		print "total ",count," images ",oldname," to  " , newname

